//
//  SKYNetworkSection.h
//  Pods
//
//  Created by Walker on 2016/12/20.
//
//

#import <Foundation/Foundation.h>


API_AVAILABLE(ios(7.0))
NS_ASSUME_NONNULL_BEGIN
/**
 网络请求回话
 */
@interface SKYNetworkSection : NSObject<NSURLSessionDelegate>

/** session对象 */
@property (readonly, nonatomic, strong) NSURLSession *session;
/** 当前section回话下所有任务 */
@property (readonly, nonatomic, strong) NSArray <NSURLSessionTask *> *tasks;

+ (instancetype)section;

- (NSURLSessionTask *)request:(NSMutableURLRequest *)request completionHandler:(nullable void(^)(NSHTTPURLResponse * _Nullable response, NSData * _Nullable data,NSError * _Nullable error))completionHandler;


@end
NS_ASSUME_NONNULL_END
